package net.vkits.anjiamiao.domain.model;

import net.vkits.common.BaseModel;

import javax.persistence.Embeddable;
import java.math.BigDecimal;

/**
 * Created by ethan-liu on 2016/11/12.
 */
@Embeddable
public class OriginalOrder extends BaseModel {
    private String amount;
    private Boolean hasDeposit = false;
    private Boolean hasFee = false;
    private String rate;
    private String serviceFee;
    private Boolean notifyLandlord = false;

    public String getAmount() {
        return amount;
    }

    public boolean isAmountEquals(String totalAmount) {
        BigDecimal a = new BigDecimal(this.amount).setScale(2, BigDecimal.ROUND_HALF_DOWN);
        BigDecimal t = new BigDecimal(totalAmount).setScale(2, BigDecimal.ROUND_HALF_DOWN);
        return a.equals(t);
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public Boolean getHasDeposit() {
        return hasDeposit;
    }

    public void setHasDeposit(Boolean hasDeposit) {
        this.hasDeposit = hasDeposit;
    }

    public Boolean getHasFee() {
        return hasFee;
    }

    public void setHasFee(Boolean hasFee) {
        this.hasFee = hasFee;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    public String getServiceFee() {
        return serviceFee;
    }

    public void setServiceFee(String serviceFee) {
        this.serviceFee = serviceFee;
    }

    public Boolean getNotifyLandlord() {
        return notifyLandlord;
    }

    public void setNotifyLandlord(Boolean notifyLandlord) {
        this.notifyLandlord = notifyLandlord;
    }
}
